public class Dog{
    public String name;
    public String gender;
    int age;

    public Dog(String name,String gender,int age){
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    @Override
    public String toString(){
        return "[" + name + "," + gender + "," + age + "]";
    }

    public static void main(String[] args){
        Dog a = new Dog("jinmao","公",7);
        System.out.println(a);
    }

}